how to clear terminal in java

146

how to clear terminal in java -

public class ClearConsoleScreen {
    public static void main(String[] args){
        System.out.print("Everything on the console will cleared");
        System.out.print("\033[H\033[2J");
        System.out.flush();
    }
}

Comments

Submit
0 Comments